package cn.codergege.demo.dsl

import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4

@RunWith(JUnit4::class)
class TagTest {
    @Test fun testTag() {
        Tag("html").apply {
            properties["id"] = "id"
            children.add(Tag("head"))
        }.render().let { println(it) }
    }

    @Test fun testTag2() {
        html {
//            properties["id"] = "id"
            "id"("htmlId")
//            children.add(Tag("head"))
            "head" {
                "style"("none")
            }
        }.render().let { println(it) }
    }
}